﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ActiproSoftware.Windows.Controls.Ribbon.Input;
using ActiproSoftware.Windows.Controls.Ribbon;
using System.Windows.Media;

namespace XWord.GUI.Views.Tabs
{
    /// <summary>
    /// Contains the application-defined commands used for the <see cref="Ribbon"/> control.
    /// </summary>
    public class ThemeApplicationCommands
    {

        private static RibbonCommand themeBlack;
        private static RibbonCommand themeBlue;
        private static RibbonCommand themeCustom;
        private static RibbonCommand themeSilver;
        private static RibbonCommand themeSystem;
        private static RibbonCommand toggleGlassEnabled;
        private static RibbonCommand toggleMaximizeButtonVisible;
        private static RibbonCommand toggleMinimizeButtonVisible;

        /////////////////////////////////////////////////////////////////////////////////////////////////////
        // PUBLIC PROCEDURES
        /////////////////////////////////////////////////////////////////////////////////////////////////////

        /// <summary>
        /// Gets the <see cref="RibbonCommand"/> that is used to set a black theme.
        /// </summary>
        /// <value>The <see cref="RibbonCommand"/> that is used to set a black theme.</value>
        public static RibbonCommand ThemeBlack
        {
            get
            {
                if (themeBlack == null)
                    themeBlack = new RibbonCommand("ThemeBlack", typeof(Ribbon), "Black Theme", "/Resources/Images/ThemeBlack32.png", "/Resources/Images/ThemeBlack16.png", "Switches the Ribbon to use the built-in black color scheme.");
                return themeBlack;
            }
        }

        /// <summary>
        /// Gets the <see cref="RibbonCommand"/> that is used to set a blue theme.
        /// </summary>
        /// <value>The <see cref="RibbonCommand"/> that is used to set a blue theme.</value>
        public static RibbonCommand ThemeBlue
        {
            get
            {
                if (themeBlue == null)
                    themeBlue = new RibbonCommand("ThemeBlue", typeof(Ribbon), "Blue Theme", "/Resources/Images/ThemeBlue32.png", "/Resources/Images/ThemeBlue16.png", "Switches the Ribbon to use the built-in blue color scheme.");
                return themeBlue;
            }
        }

        /// <summary>
        /// Gets the <see cref="RibbonCommand"/> that is used to set a custom theme.
        /// </summary>
        /// <value>The <see cref="RibbonCommand"/> that is used to set a custom theme.</value>
        public static RibbonCommand ThemeCustom
        {
            get
            {
                if (themeCustom == null)
                    themeCustom = new RibbonCommand("ThemeCustom", typeof(Ribbon), null, (ImageSource)null, null, "Switches the Ribbon to use a custom color scheme.");
                return themeCustom;
            }
        }

        /// <summary>
        /// Gets the <see cref="RibbonCommand"/> that is used to set a silver theme.
        /// </summary>
        /// <value>The <see cref="RibbonCommand"/> that is used to set a silver theme.</value>
        public static RibbonCommand ThemeSilver
        {
            get
            {
                if (themeSilver == null)
                    themeSilver = new RibbonCommand("ThemeSilver", typeof(Ribbon), "Silver Theme", "/Resources/Images/ThemeSilver32.png", "/Resources/Images/ThemeSilver16.png", "Switches the Ribbon to use the built-in silver color scheme.");
                return themeSilver;
            }
        }

        /// <summary>
        /// Gets the <see cref="RibbonCommand"/> that is used to set a system theme.
        /// </summary>
        /// <value>The <see cref="RibbonCommand"/> that is used to set a system theme.</value>
        public static RibbonCommand ThemeSystem
        {
            get
            {
                if (themeSystem == null)
                    themeSystem = new RibbonCommand("ThemeSystem", typeof(Ribbon), "System Theme", "/Resources/Images/ThemeSystem32.png", "/Resources/Images/ThemeSystem16.png", "Switches the Ribbon to use a built-in system scheme.");
                return themeSystem;
            }
        }

        /// <summary>
        /// Gets the <see cref="RibbonCommand"/> that is used to toggle whether Vista glass effects are enabled (only works on Vista w/Aero enabled).
        /// </summary>
        /// <value>The <see cref="RibbonCommand"/> that is used to toggle whether Vista glass effects are enabled (only works on Vista w/Aero enabled).</value>
        public static RibbonCommand ToggleGlassEnabled
        {
            get
            {
                if (toggleGlassEnabled == null)
                    toggleGlassEnabled = new RibbonCommand("ToggleGlassEnabled", typeof(Ribbon), "Vista Glass Enabled", "/Resources/Images/QuickStart32.png", "/Resources/Images/QuickStart16.png", "Toggles whether glass effects are enabled when running Windows Vista with Aero (only alters UI in Vista Windows applications).");
                return toggleGlassEnabled;
            }
        }

        /// <summary>
        /// Gets the <see cref="RibbonCommand"/> that is used to toggle whether the window includes a maximize button.
        /// </summary>
        /// <value>The <see cref="RibbonCommand"/> that is used to toggle whether the window includes a maximize button.</value>
        public static RibbonCommand ToggleMaximizeButtonVisible
        {
            get
            {
                if (toggleMaximizeButtonVisible == null)
                    toggleMaximizeButtonVisible = new RibbonCommand("ToggleMaximizeButtonVisible", typeof(Ribbon), "Max Button Visible", null, "/Resources/Images/Maximize16.png", "Toggles whether the maximize button is visible.");
                return toggleMaximizeButtonVisible;
            }
        }

        /// <summary>
        /// Gets the <see cref="RibbonCommand"/> that is used to toggle whether the window includes a minimize button.
        /// </summary>
        /// <value>The <see cref="RibbonCommand"/> that is used to toggle whether the window includes a minimize button.</value>
        public static RibbonCommand ToggleMinimizeButtonVisible
        {
            get
            {
                if (toggleMinimizeButtonVisible == null)
                    toggleMinimizeButtonVisible = new RibbonCommand("ToggleMinimizeButtonVisible", typeof(Ribbon), "Min Button Visible", null, "/Resources/Images/Minimize16.png", "Toggles whether the minimize button is visible.");
                return toggleMinimizeButtonVisible;
            }
        }
    }
}
